package com.sample.oraclejdbc.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sample.oraclejdbc.repository.TbAgentRepository;

@RestController
public class TbAgentController {
	
	@Autowired
	private TbAgentRepository repository;
	
    @GetMapping(value="/agent/list", produces="application/json;charset=UTF-8")
    public List<Map<String, Object>> list() {
        final List<Map<String, Object>> countries = repository.selectList();
        return countries;
    }

}
